﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Brain;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using Brain.Editor;

namespace Demos
{
    public class BezierCurve2DSample : DemoScreen
    {
        public BezierCurve2D Curve;

        public Sprite Control1;
        public Sprite Control2;

        public BezierCurveEditor2D Editor;

        public BezierCurve2DSample()
        {
            Editor = new BezierCurveEditor2D();

            Curve = new BezierCurve2D();
            Curve.Rendering = SpriteRendering.Rendered;

            Editor.EdittingCurve = Curve;

            Curve.AddPoint(new Vector2(100, 100), new Vector2(100, 200));
            Curve.AddPoint(new Vector2(400, 200), new Vector2(400, 100));
            Curve.AddPoint(new Vector2(800, 200), new Vector2(400, 100));
        }

        public override void Update()
        {
            base.Update();
        }

        public override void Draw()
        {
            base.Draw();

            Editor.Draw();
        }

    }
}
